package com.ruoyi.system.controllerApi;

import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.system.service.IHikVideoAllGroupFlowNewService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/api/groupFlow")
public class HikVideoAllGroupFlowNewApiController {

    @Autowired
    private IHikVideoAllGroupFlowNewService hikVideoAllGroupFlowNewService;

    /**
     * 查询今日客流信息
     */
    @GetMapping("/todayFlow")
    public AjaxResult todayFlow(String time) {
        Integer count = hikVideoAllGroupFlowNewService.countTodayFlow(time);
        return AjaxResult.success(count);
    }

    /**
     * 查询日期客流信息
     */
    @GetMapping("/sevenFlow")
    public AjaxResult sevenFlow() {
        Integer count = hikVideoAllGroupFlowNewService.sevenFlow();
        return AjaxResult.success(count);
    }
}
